import HttpRequest from '@/api/request';
import ApiConfig from '@/api/api-config';
function getKey(data) {
    let url = ApiConfig.passwordPublicKey;
    return HttpRequest.requestJsonPost(url,data)
}
function login(data) {
    let url = ApiConfig.login;
    return HttpRequest.requestFormPost(url,data)
}
function logout(data) {
    let url = ApiConfig.logout;
    return HttpRequest.requestJsonPost(url,data)
}
function captcha(data) {
    let url = ApiConfig.captcha;
    return HttpRequest.requestBlobPost(url,data)
}
function guestLogin(data) {
    let url = ApiConfig.guestLogin;
    return HttpRequest.requestJsonPost(url,data)
}
// 故障工单列表
function workOrderList(data) {
    let url = ApiConfig.workOrderList;
    return HttpRequest.requestJsonPost(url,data)
}
function workOrderById(data) {
    let url = ApiConfig.workOrderById+'?id='+data;
    return HttpRequest.requestJsonPost(url)
}
function codeListByType(data) {
    let url = ApiConfig.byType+'?codeType='+data;
    return HttpRequest.requestJsonPost(url)
}
function hallGetList(data) {
    let url = ApiConfig.hallGetList+'?cinemaCode='+data;
    return HttpRequest.requestJsonPost(url)
}
function deviceGetList(data) {
    let url = ApiConfig.deviceGetList+'?hallId='+data;
    return HttpRequest.requestJsonPost(url)
}
function workOrderUpdateState(data){
    let url = ApiConfig.workOrderUpdateState;
    return HttpRequest.requestJsonPost(url,data)
}
function workOrderSave(data){
    let url = ApiConfig.workOrderSave;
    return HttpRequest.requestJsonPost(url,data)
}
function selectLog(data){
    let url = ApiConfig.selectLog+'?id='+data;
    return HttpRequest.requestJsonPost(url)
}
function byHeadquartersCode(data) {
    let url = ApiConfig.byHeadquartersCode+'?allFlag=' +data;
    return HttpRequest.requestJsonPost(url)
}
function showState(data){
    let url = ApiConfig.showState;
    return HttpRequest.requestJsonPost(url,data)
} 
function selectShowLog(data){
    let url = ApiConfig.selectShowLog;
    return HttpRequest.requestJsonPost(url,data)
} 
function updatePredict(data){
    let url = ApiConfig.updatePredict+'?hourNum='+data;
    return HttpRequest.requestJsonPost(url)
} 
function codeListbyTypeList(data){
    let url = ApiConfig.codeListbyType+'?codeType='+data;
    return HttpRequest.requestJsonPost(url)
} 
function selectPredict(){
    let url = ApiConfig.selectPredict;
    return HttpRequest.requestJsonPost(url)
} 
let Service = {
	getKey,
	login,
    logout,
    captcha,
    guestLogin,
    workOrderList,
    workOrderById,
    codeListByType,
    hallGetList,
    deviceGetList,
    workOrderUpdateState,
    workOrderSave,
    selectLog,
    byHeadquartersCode,
    showState,
    selectShowLog,
    updatePredict,
    codeListbyTypeList,
    selectPredict
};
export default Service;